package com.myblog.demo.service;

import com.myblog.demo.entity.vo.CommentInfoVO;
import com.myblog.demo.mapper.CommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {
    @Autowired
    private CommentMapper commentMapper;

    public List<CommentInfoVO> getCommentsList(Integer aid){
        return commentMapper.getCommentsList(aid);
    }

    public int addComment(Integer uid, Integer aid, String content){
        return commentMapper.addComment(uid, aid, content);
    }

    public int delCommentById(Integer id, Integer uid, Integer aid){
        return commentMapper.delCommentById(id, uid, aid);
    }

}
